package org.jeecg.modules.iot.feign.factory;


import org.jeecg.modules.iot.feign.client.ParkClient;
import org.jeecg.modules.iot.feign.fallback.ParkClientFallback;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ParkClientFactory implements FallbackFactory<ParkClient> {

    @Override
    public ParkClient create(Throwable throwable) {
        ParkClientFallback fallback = new ParkClientFallback();
        fallback.setCause(throwable);
        return fallback;
    }
}
